﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Models
{
    #region 开票系统路径
    public class KPPathModel
    {
        public string TaxCode { get; set; }
        public string MachineNum { get; set; }
        public string DBPath { get; set; }
        public string Name { get; set; }
    }
    #endregion
    #region 结果分组模型
    public class DataGroupModel
    {
        public string ProName { get; set; }
        public decimal TaxRate { get; set; }
        public decimal Price { get; set; }
    }
    #endregion
    #region 结果列表模型
    public class DataModel
    {
        public string InvCode { get; set; }
        public string InvNum { get; set; }
        public string CustName { get; set; }
        public string CustTax { get; set; }
        public string CustAddr { get; set; }
        public string CustBank { get; set; }
        public string InvDate { get; set; }
        public string Product { get; set; }
        public decimal Quantity { get; set; }
        public decimal Price { get; set; }
        public decimal Amount { get; set; }
        public decimal TaxAmount { get; set; }
        public decimal TaxRate { get; set; }
        public decimal TotalAmount { get { return Amount + TaxAmount; } }
        public int InvState { get; set; }
        public string InvStateString { get { return InvState == 1 ? "作废" : "正常"; } }
        public string InvType { get; set; }
        public string InvTypeString
        {
            get
            {
                if (InvType == "c")
                    return "普通发票";
                else if (InvType == "s")
                    return "专用发票";
                else if (InvType == "p")
                    return "普通电子发票";
                else
                    return "其它类型";
            }
        }
    }
    #endregion

}
